import 'dart:convert';
import 'package:safetymonitor/app/data/entities/home/query_params_entity.dart';
import 'package:safetymonitor/generated/json/base/json_field.dart';
import 'package:safetymonitor/generated/json/risk_tree_entity.g.dart';

@JsonSerializable()
class RiskTreeEntity {
  RiskTreeEntity();
  factory RiskTreeEntity.fromJson(Map<String, dynamic> json) => $RiskTreeEntityFromJson(json);
  ///	子集
  List<RiskTreeEntity>? children = [];
  int? id = 0;
  int? nodeId = 0;
  int? nodeType = 0;
  String? nodeName = '';
  /// 是否展开
  bool? isExpand = false;
  /// 路径
  String? path;
  QueryParamsEntity? queryParams;
  Map<String, dynamic> toJson() => $RiskTreeEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
